home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
MEDICAL
/
1752.ZIP
/
MHD.ZIP
/
MHSRORGN.PRG
< prev
next >
Wrap
Text File
|
1986-07-08
|
5KB
|
142 lines
* MHSRORGN DB3 PLUS REVISION 03/06/86
*
* Search for susceptible organism
*
CLOSE DATABASES
choice2 = 0
repeat = .T.
DELETE FILE MHWORK1.DBF
USE MHWORK
COPY STRUCTURE TO MHWORK1
STORE 'organism' TO field
DO WHILE repeat
CLEAR
? 'MENU TO SELECT ANTIMICROBIAL DRUG ACCORDING TO SUSCEPTIBLE ORGANISM'
?
? 'You may search by classification or specific organism'
? ' 1. free-form search 16. Listeria'
? ' 2. anaerobes 17. Morganella'
? ' 3. Acinetobacter 18. Mycoplasma'
? ' 4. Actinomyces 19. Neisseria gonorrhea'
? ' 5. Bacteroides 20. Peptococcus'
? ' 6. Candida 21. Peptostreptococcus'
? ' 7. Chlamydia 22. Proteus'
? ' 8. Clostridium 23. Providencia'
? ' 9. Enterobacter 24. Pseudomonas'
? ' 10. Enterococcus 25. Serratia'
? ' 11. Escherichia coli 26 Staphylococcus'
? ' 12. Gardnerella 27. Streptococcus'
? ' 13. Herpes 28. Treponema pallidum'
? ' 14. Haemophilus ducreyi 29. Trichomonas'
? ' 15. Klebsiella'
?
ACCEPT 'Enter the number of your choice: ' TO choice
STORE VAL(choice) TO choice2
IF choice2 >= 1 .AND. choice2 <= 29
repeat = .F.
ENDIF choice2 >= 1 and <= 29
ENDDO WHILE repeat
DO CASE
CASE choice2 = 1
? 'You may enter a search string using dBASE II conventions,'
? 'with each term enclosed in single quotes followed by $organism'
ACCEPT 'Enter string: ' TO search
CASE choice2 = 2
STORE 'anaerobes' TO search
CASE choice2 = 3
STORE 'Acinetobacter' TO search
CASE choice2 = 4
STORE 'Actinomyces' TO search
CASE choice2 = 5
STORE 'Bacteroides' TO search
CASE choice2 = 6
STORE 'Candida' TO search
CASE choice2 = 7
STORE 'Chlamydia' TO searchè CASE choice2 = 8
STORE 'Clostridium' TO search
CASE choice2 = 9
STORE 'Enterobacter' TO search
CASE choice2 = 10
STORE 'Enterococcus' TO search
CASE choice2 = 11
STORE 'Escherichia coli' TO search
CASE choice2 = 12
STORE 'Gardnerella' TO search
CASE choice2 = 13
STORE 'Herpes' TO search
CASE choice2 = 14
STORE 'Haemophilus ducreyi' TO search
CASE choice2 = 15
STORE 'Klebsiella' TO search
CASE choice2 = 16
STORE 'Listeria' TO search
CASE choice2 = 17
STORE 'Morganella' TO search
CASE choice2 = 18
STORE 'Mycoplasma' TO search
CASE choice2 = 19
STORE 'Neisseria gonorrhea' TO search
CASE choice2 = 20
STORE 'Peptococcus' TO search
CASE choice2 = 21
STORE 'Peptostreptoccus' TO search
CASE choice2 = 22
STORE 'Proteus' TO search
CASE choice2 = 23
STORE 'Providencia' TO search
CASE choice2 = 24
STORE 'Pseudomonas' TO search
CASE choice2 = 25
STORE 'Serratia' TO search
CASE choice2 = 26
STORE 'Staphylococcus' TO search
CASE choice2 = 27
STORE 'Streptococcus' TO search
CASE choice2 = 28
STORE 'Treponema pallidum' TO search
CASE choice2 = 29
STORE 'Trichomonas' TO search
ENDCASE
? 'Searching database for antimicrobials effective against: '
IF search2
? combsrch + ' and '+ search
ENDIF search2
IF .NOT. search2
? search
ENDIF NOT search2
* Select data and store in MHWORK1.DBF or MHWORK2.DBF
SELECT B
USE MHWORK1
SELECT A
USE &datafile
* Match free form search string with data in fieldèIF STR(choice2,1) = '1'
DO WHILE .NOT. EOF()
IF &search
STORE DRUG_ID TO mdrug_id
* Store matching drug:id in temporary WORK1
SELECT MHWORK1
APPEND BLANK
REPLACE DRUG_ID WITH mdrug_id
SELECT &datafile
ENDIF &search
SKIP
ENDDO WHILE NOT EOF
ENDIF STR(choice2,1) = '1'
* Match menu-chosen search string with data in field
IF STR(choice2,1) <> '1'
DO WHILE .NOT. EOF()
IF '&search' $&field
STORE DRUG_ID TO mdrug_id
* Store matching drug:id in temporary WORK1
SELECT MHWORK1
APPEND BLANK
REPLACE DRUG_ID WITH mdrug_id
SELECT &datafile
ENDIF '&search' $&field
SKIP
ENDDO WHILE NOT EOF
ENDIF STR(choice2,1) <> '1'
choice = '1'
repeat = .T.
RETURN